# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Arjan Timmerman <arjan@archlinux.org>

pkgname=libxklavier
pkgver=5.4
pkgrel=2
pkgdesc="High-level API for X Keyboard Extension"
arch=(x86_64)
license=('LGPL')
depends=('glib2' 'libxkbfile' 'libxml2' 'xkeyboard-config' 'libxi' 'iso-codes')
makedepends=('gobject-introspection' 'intltool' 'gtk-doc' 'libxfixes' git)
options=('!emptydirs')
url="https://www.freedesktop.org/wiki/Software/LibXklavier/"
_commit=396955bd2ba2db34a42b3807b03155fcc11dfe50  # tags/libxklavier-5.4^0
source=("git+https://anongit.freedesktop.org/git/libxklavier#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^libxklavier-//;s/-/+/g'
}

build() {
  cd "$pkgname"
  ./autogen.sh --prefix=/usr --with-xkb-bin-base=/usr/bin \
      --with-xkb-base=/usr/share/X11/xkb --disable-static --enable-gtk-doc
  make
}

package() {
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}
